﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/UserUI/User.Master" AutoEventWireup="true" CodeBehind="SupplierPaymentEntry.aspx.cs" Inherits="BoutiquePOS.UI.UserUI.SupplierPaymentEntry" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../Styles/UserUI/Button.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/UserUI/DivStyle.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        function check() {
            if (document.getElementById('<% = supplierPaymentIdTextBox.ClientID %>').value == "") {
                alert("Enter a cabin no.");
            }
            var agree = confirm("Are you sure you want to delete this Information?");
            if (agree)
                return true;
            else
                return false;
        }
        function validation() {
            if (document.getElementById('<% =paidAmountTextBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Payment amount cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =paidAmountTextBox.ClientID %>').focus();
                return false;
            }
            return true;
        }
     </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fieldset>
        <legend style="color: blue">|| Supplier Payment Entry ||</legend>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Invoice No.
                    </label>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <%--<input type="text" id="purchaseIdTextBox" runat="server" />--%>
                    <asp:TextBox ID="purchaseIdTextBox" runat="server" 
                        ontextchanged="purchaseIdTextBox_TextChanged" AutoPostBack="True"></asp:TextBox>
                </div>
            </div>
        </div>
        <br/>
        <%--1st row close--%>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Due Amount
                    </label>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="dueAmountTextBox" runat="server" />
                </div>
            </div>
        </div>
          <br/>
        <%--2nd row close--%>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Payment Date
                    </label>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="paymentDateTextBox" runat="server" />
                </div>
            </div>
        </div>
          <br/>
        <%--3rd row close--%>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Paid Amount
                    </label>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="paidAmountTextBox" runat="server" />
                </div>
            </div>
        </div>
          <br/>
        <%--4th row close--%>
        
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <p id="messageResult" runat="server">
                    </p>
                </div>
            </div>
        </div>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <p id="P1" runat="server" style="color: white">blank space</p>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="submit" runat="server" class="myButton" value="Save" id="saveButton"
                        onserverclick="SaveButton" onclick="javascript:return validation()"/>&nbsp;
                    <input type="submit" runat="server" class="myButton" value="Clear" id="clearButton"
                        onserverclick="ClearButton" />&nbsp;
                    <input type="submit" runat="server" class="myButton" value="Close" id="closeButton"
                        onserverclick="CloseButton" />&nbsp;
                </div>
            </div>
        </div>
    </fieldset>
    <fieldset>
        <legend style="color: blue">|| Delete Supplier Payment ||</legend>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Supplier Payment Id
                    </label>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="supplierPaymentIdTextBox" runat="server" />
                </div>
            </div>
        </div>
          <br/>
        <%--5th row close--%>
         <div class="divRow">
              <div class="divColumn">
                <div>
                    <p id="p5" runat="server" style="color: white">blank space</p>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="submit" runat="server" class="myButton" value="Delete" id="deleteButton"
                        onserverclick="DeleteButton" onclick="javascript:return check()"/>
                </div>
            </div>
        </div>

    </fieldset>
</asp:Content>

<%--<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>--%>
